home *** CD-ROM | disk | FTP | other *** search
/ Celestin Apprentice 4 / Apprentice-Release4.iso / Source Code / C++ / Applications / SeeMovieRun 2.0 / Source / CEBSwitchboard.cp < prev    next >
Encoding:
Text File  |  1995-08-02  |  1.8 KB  |  63 lines  |  [TEXT/KAHL]

  1. /******************************************************************************
  2.  CEBSwitchboard.cp
  3.  
  4.                     The Event Broadcasting Switchboard Class
  5.         
  6.         Event Broadcasting switchboard, uses a single global instance of a
  7.         CEBCollaborator broadcast events to any object that needs it.
  8.     
  9.     SUPERCLASS = CSwitchboard
  10.     
  11.     Copyright © 1992 Joe Zobkiw. All rights reserved.
  12.     Portions Copyright © 1990 Symantec Corporation.  All rights reserved.
  13.  
  14.     Copyright © 1995 Gregory Bonk. All rights reserved.
  15.         Changes upgrade to TPM 7.0.7
  16.  ******************************************************************************/
  17.  
  18. #include "CEBSwitchboard.h"
  19. #include "CEBCollaborator.h"
  20.  
  21. /*** Global Variables ***/
  22.     
  23. extern CDesktop            *gDesktop;            /* The visible Desktop */
  24. extern CEBCollaborator    *gEBCollaborator;    /* event broadcaster */
  25.  
  26.  
  27. /**** C O N S T R U C T I O N / D E S T R U C T I O N   M E T H O D S ****/
  28.  
  29. CEBSwitchboard::CEBSwitchboard(void) : CSwitchboard()
  30. {
  31.  
  32. }
  33.  
  34.  
  35. CEBSwitchboard::~CEBSwitchboard(void)
  36. {
  37.  
  38. }
  39.  
  40.  
  41. /******************************************************************************
  42.  DispatchEvent
  43.  
  44.         Handle broadcasting all events except null events
  45.  ******************************************************************************/
  46. void    CEBSwitchboard::DispatchEvent(EventRecord *macEvent)
  47. {
  48.     gEBCollaborator->BroadcastEvent(macEvent);
  49.     inherited::DispatchEvent(macEvent);
  50. }
  51.  
  52.  
  53. /******************************************************************************
  54.  DoIdle
  55.  
  56.         Handle broadcasting null events here because they do not get routed 
  57.         through DispatchEvent.
  58.  ******************************************************************************/
  59. void    CEBSwitchboard::DoIdle(EventRecord *macEvent)    /* Usually a null or system event    */
  60. {
  61.     gEBCollaborator->BroadcastEvent(macEvent);
  62.     inherited::DoIdle(macEvent);
  63. }